﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;

namespace PresentationLayer
{
    public partial class CriarCliente : Form
    {
        public CriarCliente()
        {
            InitializeComponent();
        }

        private void bCriar_Click(object sender, EventArgs e)
        {
            this.textNIF.SelectAll();
            this.TexNomeCliente.SelectAll();
            this.textMorada.SelectAll();
            this.textTelefone.SelectAll();
            this.textEmail.SelectAll();
            this.boxTipoCliente.SelectAll();
            if (ClienteActions.CriarCliente(this.TexNomeCliente.SelectedText, this.textNIF.SelectedText, this.textMorada.SelectedText,
                 this.textEmail.SelectedText, this.textTelefone.SelectedText, this.boxTipoCliente.SelectedText))
            {
                this.Close();
            }
            else { /*Lançar Box de Falha de criação*/}
        }
    }
}
